<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'evento.label', default: 'Evento')}" />
        <title><g:message code="default.create.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="cabelistlateral"><img src="${resource(dir:'images',file:'seta_cabecalho_20x20.png')}" /> Cadastro de Eventos</div><br/>
        <inc:include url="/includes/inc_estagiario_menu.gsp" />
        <div class="body">
            <form method="post" action="${createLink(controller:'evento', action:'save')}">
                <div class="dialog dadospessoais">
                    <g:if test="${flash.message}">
                        <div class="message">${flash.message}</div>
                    </g:if>
                    <g:hasErrors bean="${eventoInstance}">
                        <div class="errors erro">
                            <g:renderErrors bean="${eventoInstance}" as="list" />
                        </div>
                    </g:hasErrors>
                    <table>
                        <tbody>
                            <input type="hidden" name="estagiario.id" value="${session.pessoa.id}"/>
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="nome"><g:message code="evento.nome.label" default="Evento" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: eventoInstance, field: 'nome', 'errors')}">
                                    <g:textField name="nome" maxlength="100" size="50" value="${eventoInstance?.nome}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="instOrganizadora"><g:message code="evento.instOrganizadora.label" default="Instituição Organizadora" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: eventoInstance, field: 'instOrganizadora', 'errors')}">
                                    <g:textField name="instOrganizadora" maxlength="100" size="50" value="${eventoInstance?.instOrganizadora}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="ano"><g:message code="evento.ano.label" default="Ano" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: eventoInstance, field: 'ano', 'errors')}">
                                    <g:textField name="ano" value="${fieldValue(bean: eventoInstance, field: 'ano')}" />
                                </td>
                            </tr>

                            <tr>
                              <td></td>
                              <td class="btsalvarcadastro">
                                  <g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" />
                              </td>
                            </tr>

                        </tbody>
                    </table>
                </div>

                <div class="dadoslateral">
                  <g:include  view="evento/inc_list.gsp" />
                </div>

            </form>
        </div>
    </body>
</html>
